var port = '3000';

var server = http.createServer(function (req,res){
    if(req.url == '') {
        // 打开idex.html
        router.showIndex(req,res);
    }else if (req.url.substr(0,4) == 'stu'){
        // 学号
        router.showStu(req,res);
    }else{
        router.showPp(req,res);
    }
});

server.listen(port,hostname,function(){
    console.log('朋友就是拿来卖的');
});